package com.ruoyi.redtea.dualprevent.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 风险点管控措施
 * @TableName train_risk_point_control_ways
 */
@TableName(value ="train_risk_point_control_ways")
@Data
public class TrainRiskPointControlWays implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 措施一级分类
     */
    private Integer category1;

    /**
     * 措施二级分类
     */
    private Integer category2;

    /**
     * 管控措施描述
     */
    private String wayDesc;

    /**
     * 分析单元风险点id
     */
    private Integer riskPointId;

    /**
     * 
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 
     */
    @TableLogic
    private Integer isdel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TrainRiskPointControlWays other = (TrainRiskPointControlWays) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCategory1() == null ? other.getCategory1() == null : this.getCategory1().equals(other.getCategory1()))
            && (this.getCategory2() == null ? other.getCategory2() == null : this.getCategory2().equals(other.getCategory2()))
            && (this.getWayDesc() == null ? other.getWayDesc() == null : this.getWayDesc().equals(other.getWayDesc()))
            && (this.getRiskPointId() == null ? other.getRiskPointId() == null : this.getRiskPointId().equals(other.getRiskPointId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsdel() == null ? other.getIsdel() == null : this.getIsdel().equals(other.getIsdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCategory1() == null) ? 0 : getCategory1().hashCode());
        result = prime * result + ((getCategory2() == null) ? 0 : getCategory2().hashCode());
        result = prime * result + ((getWayDesc() == null) ? 0 : getWayDesc().hashCode());
        result = prime * result + ((getRiskPointId() == null) ? 0 : getRiskPointId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsdel() == null) ? 0 : getIsdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", category1=").append(category1);
        sb.append(", category2=").append(category2);
        sb.append(", wayDesc=").append(wayDesc);
        sb.append(", riskPointId=").append(riskPointId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isdel=").append(isdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}